home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / a_man / cat1 / autofs.z / autofs
Encoding:
Text File  |  2001-04-17  |  22.7 KB  |  463 lines

  1.  
  2.  
  3.  
  4. aaaauuuuttttooooffffssss((((1111MMMM))))                                                          aaaauuuuttttooooffffssss((((1111MMMM))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      autofs - install automatic mount points
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ////uuuussssrrrr////eeeettttcccc////aaaauuuuttttooooffffssss [ ----vvvv ] [ ----tttt _d_u_r_a_t_i_o_n ] [ ----rrrr ]
  13.  
  14. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  15.      aaaauuuuttttooooffffssss is a command that installs AAAAuuuuttttooooFFFFSSSS mount points and associates an
  16.      AAAAuuuuttttooooFFFFSSSS map with each mount point.  The AAAAuuuuttttooooFFFFSSSS filesystem monitors
  17.      attempts to access directories within it and notifies the aaaauuuuttttooooffffssssdddd(1M)
  18.      daemon.  The daemon uses the map to locate a filesystem, which it then
  19.      mounts at the point of reference within the AAAAuuuuttttooooFFFFSSSS filesystem.  If the
  20.      filesystem is not accessed within an appropriate interval (five minutes
  21.      by default), the aaaauuuuttttooooffffssssdddd daemon unmounts the filesystem.
  22.  
  23.      AAAAuuuuttttooooFFFFSSSS is started by the /_e_t_c/_i_n_i_t._d/_n_e_t_w_o_r_k script, if the configuration
  24.      flags ``nfs'' and ``autofs'' are set ``on'' at system initialization.
  25.      (See autofsd(1M).)  The script starts the aaaauuuuttttooooffffssssdddd daemon and invokes the
  26.      aaaauuuuttttooooffffssss command.  The aaaauuuuttttooooffffssss command consults the master map, a local file
  27.      named ////eeeettttcccc////aaaauuuuttttoooo____mmmmaaaasssstttteeeerrrr, for a list of AAAAuuuuttttooooFFFFSSSS mount points and their maps.
  28.      The master map contains the locations of all AAAAuuuuttttooooFFFFSSSS mount points.  By
  29.      default, /_e_t_c/_a_u_t_o__m_a_s_t_e_r contains an entry for the ----hhhhoooossssttttssss map:
  30.  
  31.  
  32.           ////hhhhoooossssttttssss         ----hhhhoooossssttttssss         ----nnnnoooossssuuuuiiiidddd
  33.  
  34.      Each entry in the master file specifies a directory on which an AAAAuuuuttttooooFFFFSSSS
  35.      mount will be made followed by the AAAAuuuuttttooooFFFFSSSS map to be associated with that
  36.      mount point. Mount options may be supplied as an optional third field in
  37.      each entry.  These options are used for any entries in the map that do
  38.      not specify mount options explicitly.
  39.  
  40.      AAAAuuuuttttooooFFFFSSSS maps can be eeeexxxxeeeeccccuuuuttttaaaabbbblllleeee binary or script files too. Any AutoFS map
  41.      pointing to a file with execute permission set may be considered an
  42.      executable map file which the autofs daemon will attempt to execute at
  43.      mount time. The output (on stdout) of this executable map file is used as
  44.      part of the AutoFS map. Look at the ----EEEE option in the aaaauuuuttttooooffffssssdddd man page for
  45.      more information on executable maps.
  46.  
  47.      The aaaauuuuttttooooffffssss command is usually run without arguments.  It compares the
  48.      entries in /_e_t_c/_a_u_t_o__m_a_s_t_e_r with the current list of AAAAuuuuttttooooFFFFSSSS mounts in
  49.      /_e_t_c/_m_t_a_b and adds, removes or updates AAAAuuuuttttooooFFFFSSSS mounts to bring the
  50.      /_e_t_c/_m_t_a_b up to date with /_e_t_c/_a_u_t_o__m_a_s_t_e_r. At boot time the aaaauuuuttttooooffffssss
  51.      command installs all AAAAuuuuttttooooFFFFSSSS mounts from the master map.  Subsequently, it
  52.      may be run to install AAAAuuuuttttooooFFFFSSSS mounts for new entries in the master map, or
  53.      to perform unmounts for entries that have been removed.
  54.  
  55. OOOOPPPPTTTTIIIIOOOONNNNSSSS
  56.      ----tttt _d_u_r_a_t_i_o_n
  57.           Specify a _d_u_r_a_t_i_o_n, in seconds, that a filesystem is to remain
  58.           mounted when not in use.  The default is 300 (5 minutes).
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. aaaauuuuttttooooffffssss((((1111MMMM))))                                                          aaaauuuuttttooooffffssss((((1111MMMM))))
  71.  
  72.  
  73.  
  74.      ----vvvv   Verbose mode.  Notify of AAAAuuuuttttooooFFFFSSSS mounts, unmounts or other non-
  75.           essential information.
  76.  
  77.      ----rrrr   Remount mode.  Force remounting for all existing AAAAuuuuttttooooFFFFSSSS mount
  78.           points. Without this key aaaauuuuttttooooffffssss remounts only mount points which
  79.           options were changed in /_e_t_c/_a_u_t_o__m_a_s_t_e_r file. Combination of ----rrrr and
  80.           ----tttt keys can be used to change unmount timeout for existing AAAAuuuuttttooooFFFFSSSS
  81.           mount points.
  82.  
  83. UUUUSSSSAAAAGGGGEEEE
  84.    MMMMaaaapppp EEEEnnnnttttrrrryyyy FFFFoooorrrrmmmmaaaatttt
  85.      The format for master map entries was discussed above.  Entries in other
  86.      map files take the form:
  87.  
  88.           key [ -mount-options ] _l_o_c_a_t_i_o_n ...
  89.  
  90.      where _k_e_y is the full pathname of the directory to mount when used in a
  91.      direct map, or the simple name of a subdirectory in an indirect map.
  92.      _m_o_u_n_t-_o_p_t_i_o_n_s is a comma-separated list of mount options, and _l_o_c_a_t_i_o_n
  93.      specifies a filesystem from which the directory may be mounted.  In the
  94.      case of a simple NFS mount, _l_o_c_a_t_i_o_n takes the form:
  95.  
  96.           _h_o_s_t_n_a_m_e:_p_a_t_h_n_a_m_e
  97.  
  98.      _h_o_s_t_n_a_m_e is the name of the host from which to mount the filesystem (it
  99.      may be omitted if the pathname refers to a local device on which the
  100.      filesystem resides) and _p_a_t_h_n_a_m_e is the pathname of the directory to
  101.      mount.  So, /etc/auto_master might contain an entry such as:
  102.  
  103.           /src  /etc/auto_src           -nosuid
  104.  
  105.      where /etc/auto_src contains:
  106.  
  107.           new       awesome:/latest/src
  108.           old   -ro cave:/archive
  109.  
  110.      Accessing /src/{new,old} would result in a mount of the corresponding
  111.      remote filesystem.
  112.  
  113.    RRRReeeepppplllliiiiccccaaaatttteeeedddd FFFFiiiilllleeeessssyyyysssstttteeeemmmmssss
  114.      Multiple _l_o_c_a_t_i_o_n fields can be specified for replicated NFS filesystems,
  115.      in which case aaaauuuuttttooooffffssss chooses the server that responds first.
  116.  
  117.      If each _l_o_c_a_t_i_o_n in the list shares the same _p_a_t_h_n_a_m_e then a single
  118.      _l_o_c_a_t_i_o_n may be used with a comma-separated list of hostnames:
  119.  
  120.           _h_o_s_t_n_a_m_e_1,_h_o_s_t_n_a_m_e_2...:_p_a_t_h_n_a_m_e
  121.  
  122.      A mapping can be continued across input lines by escaping the NEWLINE
  123.      with a `\' (backslash).  Comments begin with a '#' (pound sign) and end
  124.      at the subsequent NEWLINE.
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. aaaauuuuttttooooffffssss((((1111MMMM))))                                                          aaaauuuuttttooooffffssss((((1111MMMM))))
  137.  
  138.  
  139.  
  140.    MMMMaaaapppp KKKKeeeeyyyy SSSSuuuubbbbssssttttiiiittttuuuuttttiiiioooonnnn""""
  141.      The '&' (ampersand) character is expanded to the value of the _k_e_y field
  142.      for the entry in which it occurs.  In this case:
  143.  
  144.           whozi onyxserver:/home/&
  145.  
  146.      the & expands to _w_h_o_z_i.
  147.  
  148.    _W_i_l_d_c_a_r_d _K_e_y
  149.      The '*' (asterisk) character, when supplied as the _k_e_y field, is
  150.      recognized as the catch-all entry.  Such an entry will match any key not
  151.      previously matched.  For instance, if the following entry appeared in the
  152.      indirect map for /_c_o_n_f_i_g:
  153.  
  154.           *    &:/public/config/&
  155.  
  156.      this would allow automatic mounts in /_c_o_n_f_i_g of any remote filesystem
  157.      whose location could be specified as:
  158.  
  159.           hostname:/public/config/hostname
  160.  
  161.    _V_a_r_i_a_b_l_e _S_u_b_s_t_i_t_u_t_i_o_n
  162.      Client specific variables can be used within an AAAAuuuuttttooooFFFFSSSS map.  For
  163.      instance, if $_H_O_S_T appeared within a map, aaaauuuuttttooooffffssss would expand it to its
  164.      current value for the client's host name. Supported variables are:
  165.  
  166.      ARCH      The output of uname -m. The system's architecture.
  167.                                         For example "IP19"
  168.  
  169.      CPU       The output of uname -p.  The processor type.
  170.                                         For example "mips"
  171.  
  172.      HOST      The output of uname -n.  The host name.
  173.                                         For example "ferd"
  174.  
  175.      OSNAME    The output of uname -s.  The OS name.
  176.                                         For example "IRIX"
  177.  
  178.      OSREL     The output of uname -r.  The OS release name.
  179.                                         For example "6.2"
  180.  
  181.      OSVERS    The output of uname -v.  The OS version.
  182.                                         For example "10230951"
  183.  
  184.      If a reference needs to be protected from affixed characters, you can
  185.      surround the variable name with '{}' (curly braces).
  186.  
  187.    _M_u_l_t_i_p_l_e _M_o_u_n_t_s
  188.      A multiple mount entry takes the form:
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. aaaauuuuttttooooffffssss((((1111MMMM))))                                                          aaaauuuuttttooooffffssss((((1111MMMM))))
  203.  
  204.  
  205.  
  206.           key [ -mount-options ] [[_m_o_u_n_t_p_o_i_n_t] [-_m_o_u_n_t-_o_p_t_i_o_n_s]
  207.           _l_o_c_a_t_i_o_n...]...
  208.  
  209.      The initial /[_m_o_u_n_t_p_o_i_n_t] is optional for the first mount and mandatory
  210.      for all subsequent mounts.  The optional _m_o_u_n_t_p_o_i_n_t is taken as a
  211.      pathname relative to the directory named by _k_e_y. If _m_o_u_n_t_p_o_i_n_t is omitted
  212.      in the first occurrence, a mountpoint of / (root) is implied.
  213.  
  214.      Given an entry in the indirect map for /src:
  215.  
  216.           beta -ro \
  217.                /              svr1,svr2:/public/src/beta   \
  218.                /1.0           svr1,svr2:/public/src/beta/1.0   \
  219.                /1.0/man       svr1,svr2:/public/src/beta/1.0/man
  220.  
  221.  
  222.      aaaauuuuttttooooffffssss would automatically mount /_s_r_c/_b_e_t_a, /_s_r_c/_b_e_t_a/_1._0, and
  223.      /_s_r_c/_b_e_t_a/_1._0/_m_a_n, as needed, from either _s_v_r_1 or _s_v_r_2, whichever host
  224.      responds first.
  225.  
  226.    OOOOtttthhhheeeerrrr FFFFiiiilllleeeessssyyyysssstttteeeemmmm TTTTyyyyppppeeeessss
  227.      AAAAuuuuttttooooFFFFSSSS assumes NFS Version 3 mounts as the default filesystem type.
  228.      Should the server not support NFS V3, AAAAuuuuttttooooFFFFSSSS will retry the mount(s)
  229.      using the NFS V2 filesystem type.  Users can select a particular version
  230.      of the NFS protocol using the vvvveeeerrrrssss===={{{{2222,,,,3333}}}} mount option (see fstab(4)).
  231.  
  232.      Other filesystem types can be described using the ffffssssttttyyyyppppeeee mount option.
  233.      Other mount options specific to this filesystem type can be combined with
  234.      the _f_s_t_y_p_e option.  The location field must contain information specific
  235.      to the filesystem type.  If the location field begins with a slash, a
  236.      colon character must be prepended.
  237.  
  238.      Mounts using _C_a_c_h_e_F_S are most useful when applied to an entire map as map
  239.      defaults.  The following entry in the master map describes cached home
  240.      directory mounts.  It assumes the default location of the cache
  241.      directory, /cache.
  242.  
  243.           /home     auto_home -fstype=cachefs,backfstype=nfs
  244.  
  245.  
  246.      The bbbbaaaacccckkkkffffssssttttyyyyppppeeee option is required for _C_a_c_h_e_F_S map entries.
  247.  
  248.    IIIInnnnddddiiiirrrreeeecccctttt MMMMaaaappppssss
  249.      An indirect map allows you to specify mappings for the subdirectories you
  250.      wish to mount under the _d_i_r_e_c_t_o_r_y chosen as the AAAAuuuuttttooooFFFFSSSS mount point.  In
  251.      an indirect map, each _k_e_y consists of a simple name (i.e., subdirectory)
  252.      that refers to one or more filesystems that are to be mounted as needed.
  253.  
  254.    DDDDiiiirrrreeeecccctttt MMMMaaaappppssss
  255.      Entries in a direct map are associated directly with AAAAuuuuttttooooFFFFSSSS mount points.
  256.      Each _k_e_y is the full pathname of an AAAAuuuuttttooooFFFFSSSS mount point.  The direct map
  257.      as a whole is not associated with any single directory.
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. aaaauuuuttttooooffffssss((((1111MMMM))))                                                          aaaauuuuttttooooffffssss((((1111MMMM))))
  269.  
  270.  
  271.  
  272.    IIIInnnncccclllluuuuddddeeeedddd MMMMaaaappppssss
  273.      The contents of another map can be  included  within  a  map with an
  274.      entry of the form +_m_a_p_n_a_m_e , or by supplying _m_a_p_n_a_m_e (without the "+") in
  275.      the location field of a map entry.  If mapname begins with a slash then
  276.      it is assumed to be the pathname of a local file.  Otherwise the location
  277.      of the map is determined by the policy of the name service switch
  278.      according to the entry for the automounter in ////eeeettttcccc////nnnnsssssssswwwwiiiittttcccchhhh....ccccoooonnnnffff, such as
  279.  
  280.           automount(dynamic): files nis(nis_enumerate_key) ldap
  281.  
  282.      If the name service is ffffiiiilllleeeessss then the name is assumed to be that of a
  283.      local file in ////eeeettttcccc.  NNNNIIIISSSS requires the addition of the nnnniiiissss____eeeennnnuuuummmmeeeerrrraaaatttteeee____kkkkeeeeyyyy
  284.      attribute; see nnnniiiissss((((7777PPPP)))). If the key being searched for is not found in the
  285.      included map, the search continues with the next entry subject to control
  286.      options. See nnnnsssssssswwwwiiiittttcccchhhh....ccccoooonnnnffff((((4444)))).  The ddddyyyynnnnaaaammmmiiiicccc attribute is required to
  287.      notify the Name Service Daemon (nsd) that the automount map allows
  288.      dynamic map creation. See nnnnssssdddd((((1111MMMM)))).
  289.  
  290.    SSSSppppeeeecccciiiiaaaallll MMMMaaaappppssss
  291.      There are two special maps available: ----hhhhoooossssttttssss and ----nnnnuuuullllllll.  By default, the
  292.      ----hhhhoooossssttttssss map is used with the ////hhhhoooossssttttssss directory.  It assumes that the map
  293.      key is the hostname of an NFS server.  The aaaauuuuttttooooffffssssdddd daemon dynamically
  294.      constructs a map entry from the server's list of exported filesystems.
  295.      (See NOTES on ----nnnnoooohhhhiiiiddddeeee.)  For instance a reference to /_h_o_s_t_s/_b_a_r_t/_u_s_r
  296.      would initiate an automatic mount of all exported filesystems from _b_a_r_t
  297.      that are mountable by the client.  References to a directory under
  298.      /_h_o_s_t_s/_b_a_r_t will refer to the corresponding directory relative to _b_a_r_t'_s
  299.      root.
  300.  
  301.      The ----nnnnuuuullllllll map, when indicated in a map entry, cancels a previous map for
  302.      the directory indicated.  This is most useful in the /_e_t_c/_a_u_t_o__m_a_s_t_e_r
  303.      file for cancelling entries that would otherwise be inherited from the
  304.      NIS _a_u_t_o__m_a_s_t_e_r map, if included. To be effective, the ----nnnnuuuullllllll entries must
  305.      be inserted before the included map entry.
  306.  
  307.    CCCCoooonnnnffffiiiigggguuuurrrraaaattttiiiioooonnnn aaaannnndddd tttthhhheeee aaaauuuuttttoooo....mmmmaaaasssstttteeeerrrr FFFFiiiilllleeee
  308.      _a_u_t_o_f_s normally consults the /_e_t_c/_a_u_t_o__m_a_s_t_e_r configuration file for a
  309.      list of initial autofs maps, and sets up automatic mounts for them. This
  310.      behavior differs from automount in that _a_u_t_o_f_s does not take maps on the
  311.      command line, nor does it look at the auto.master NIS map by default.
  312.      Extra mappings (either NIS or file based) should be specified within the
  313.      /_e_t_c/_a_u_t_o__m_a_s_t_e_r configuration file itself. To default to the automount
  314.      behavior, for backward compatibility with old automount maps, the user
  315.      should have one line in the /_e_t_c/_a_u_t_o__m_a_s_t_e_r configuration file, pointing
  316.      to the NIS _a_u_t_o._m_a_s_t_e_r map of the form:
  317.  
  318.           +auto.master
  319.  
  320. FFFFIIIILLLLEEEESSSS
  321.      /etc/auto_master    master AutoFS map.
  322.  
  323.  
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. aaaauuuuttttooooffffssss((((1111MMMM))))                                                          aaaauuuuttttooooffffssss((((1111MMMM))))
  335.  
  336.  
  337.  
  338.      /etc/config/autofs.options
  339.                          options and arguments for the aaaauuuuttttooooffffssss command and the
  340.                          aaaauuuuttttooooffffssssdddd daemon.
  341.  
  342. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  343.      autofsd (1M), chkconfig (1M), exports (4), fstab (4), mount (1M),
  344.      nsd(1M), nsswitch.conf (4)
  345.  
  346. NNNNOOOOTTTTEEEESSSS
  347.      The ----hhhhoooossssttttssss map mounts all of the exported NFS filesystems, for which the
  348.      client has access, from a server. Use the _n_o_h_i_d_e export option on the
  349.      server (see exports(4)) to minimize the number of mounts performed by
  350.      clients. AutoFS will not request a separate mount for a _n_o_h_i_d_e
  351.      filesystem, if the client has access via the parent filesystem.  If
  352.      frequent access to just a single filesystem is required, it is more
  353.      efficient to access the filesystem with a map entry that is tailored to
  354.      mount just the filesystem of interest.
  355.  
  356.      AAAAuuuuttttooooFFFFSSSS mount points must not be hierarchically related. aaaauuuuttttooooffffssss does not
  357.      allow an AAAAuuuuttttooooFFFFSSSS mount point to be created within another AAAAuuuuttttooooFFFFSSSS mount.
  358.  
  359.      Since each direct map entry results in a new AAAAuuuuttttooooFFFFSSSS mount such maps
  360.      should be kept short.
  361.  
  362.      If a directory contains direct map mount points then an `ls -l' in the
  363.      directory will force all of the direct map mounts to occur.
  364.  
  365.      Entries in both direct and indirect maps can be modified at any time.
  366.      The new information is used when aaaauuuuttttooooffffssssdddd next uses the map entry to do a
  367.      mount.
  368.  
  369.      New entries added to a master map or direct map will not be useful until
  370.      the aaaauuuuttttooooffffssss command is run to install them as new AAAAuuuuttttooooFFFFSSSS mount points.
  371.      New entries added to an indirect map may be used immediately.
  372.  
  373.      An AAAAuuuuttttooooFFFFSSSS directory associated with an indirect map shows only
  374.      currently-mounted entries.  This is a deliberate policy to avoid
  375.      inadvertent mounting of every entry in a map via an `ls -l' of the
  376.      directory.
  377.  
  378.      The multiple location feature for NFS mounts allows the aaaauuuuttttooooffffssssdddd daemon to
  379.      choose the most appropriate server at mount time.  While such a mount is
  380.      in effect, the daemon does not monitor the status of the server.  If the
  381.      server crashes, aaaauuuuttttooooffffssssdddd will not select an alternative server from the
  382.      list.
  383.  
  384.      Default mount options can be assigned to an entire map when specified as
  385.      an optional third field in the master map.  These options apply only to
  386.      map entries that have no mount options.
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.                                                                         PPPPaaaaggggeeee 6666
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400. aaaauuuuttttooooffffssss((((1111MMMM))))                                                          aaaauuuuttttooooffffssss((((1111MMMM))))
  401.  
  402.  
  403.  
  404.      When using NSD to resolve map queries, Autofs actually creates map
  405.      directories under the automount directory in ////nnnnssss////....llllooooccccaaaallll.... So, the NIS map
  406.      aaaauuuuttttoooo____hhhhoooommmmeeee would be created as ////nnnnssss////....llllooooccccaaaallll////aaaauuuuttttoooommmmoooouuuunnnntttt////aaaauuuuttttoooo____hhhhoooommmmeeee
  407.  
  408.  
  409. CCCCAAAAVVVVEEEEAAAATTTT((((SSSS))))
  410.      It is important not to have the execute permission set on a standard text
  411.      AAAAuuuuttttooooFFFFSSSS map, as this may cause autofs to attempt to execute the file
  412.      assuming that the standard text map file is an executable AAAAuuuuttttooooFFFFSSSS map
  413.      file. Look at the ----EEEE option in the aaaauuuuttttooooffffssssdddd man page for more information
  414.      on executable maps.
  415.  
  416.  
  417.  
  418.  
  419.  
  420.  
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.                                                                         PPPPaaaaggggeeee 7777
  460.  
  461.  
  462.  
  463.